// File generated from our OpenAPI spec by Stainless.

package com.metest.api.models.pet

import com.metest.api.core.http.QueryParams
import org.assertj.core.api.Assertions.assertThat
import org.junit.jupiter.api.Test

internal class PetListParamsTest {

    @Test
    fun create() {
        PetListParams.builder().page(0L).size(1L).addSort("string").build()
    }

    @Test
    fun queryParams() {
        val params = PetListParams.builder().page(0L).size(1L).addSort("string").build()

        val queryParams = params._queryParams()

        assertThat(queryParams)
            .isEqualTo(
                QueryParams.builder()
                    .put("page", "0")
                    .put("size", "1")
                    .put("sort", listOf("string").joinToString(","))
                    .build()
            )
    }

    @Test
    fun queryParamsWithoutOptionalFields() {
        val params = PetListParams.builder().build()

        val queryParams = params._queryParams()

        assertThat(queryParams).isEqualTo(QueryParams.builder().build())
    }
}
